package com.example.ad.sdk.domain.extensions

import java.lang.reflect.ParameterizedType

/**
 * 获取当前类绑定的泛型ViewModel-class
 */
fun <VM> getVmClazz(obj: Any): Class<VM> {
    return (obj.javaClass.genericSuperclass as ParameterizedType).actualTypeArguments[0] as Class<VM>
}
